package com.csc.banking.security;

import java.util.Date;

import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

public class SessionListener implements HttpSessionListener {

	public void sessionCreated(HttpSessionEvent se) {
		HttpSession session=se.getSession();
		Date date = new Date(session.getLastAccessedTime());		
		System.out.println("Create:"+date.toString());	
	}

	public void sessionDestroyed(HttpSessionEvent se) {
		HttpSession session=se.getSession();		
		Date date = new Date(session.getLastAccessedTime());		
		System.out.println("Destroy:"+date.toString());		
	}

}
